home *** CD-ROM | disk | FTP | other *** search
/ Acorn RISC PD-CD 1 / Acorn RISC PD-CD 1.iso / games / _spatience / spatience / scripts / exorcist < prev    next >
Encoding:
Text File  |  1992-07-03  |  3.1 KB  |  117 lines

  1. |
  2. |   Rules for the game of exorcist patience
  3. |   Designed by J.Horsnell
  4. |   For SPatience Vsn. 0.51
  5. |
  6. |   This is my own (quickly thought up) game.
  7. |   It's not very difficult, enjoy....
  8. |   The stacks on the left are of the same
  9. |   colour descending value variety.  Those
  10. |   on the right are of the different colour
  11. |   descending variety.  Whole stacks must
  12. |   conform to the rules when moving to a new
  13. |   home. The pack deal one to each stack.
  14. |
  15. | This file may provide as an introduction to
  16. | writing SPatience script files of your own.
  17. |
  18. | SPatience knows one script type at the moment but it must be declared
  19. SCRIPT_TYPE 1
  20. |
  21.  
  22. | Open a window with this title. (case sensitive inside quotes)
  23. BEGIN "Exorcist patience"
  24.  
  25.   | Declare the game state flag defaults
  26.   FLAGS ClickFly AutoFly AnimateFly
  27.  
  28.   | We need 4 packs for this game
  29.   PACKS 4
  30.  
  31.   | The window width is 17 stack widths plus a little for the border
  32.   WIDTH 17 * CW + 14
  33.  
  34.   | Lets have a generous height (30 card card_stack plus a stack)
  35.   HEIGHT 16 + CH + 1244
  36.  
  37.   | We win if there are 208 cards (all of them) in the foundations
  38.   ZeroToWin 208 - CARDSIN$2
  39.  
  40.   | Now define the foundations.
  41.   FOR foundation = 0 to 7
  42.  
  43.     | These are standard foundations, mostly default.
  44.     | First the left eight.
  45.     FOUNDATION
  46.       X 14 + CW * foundation
  47.       Y 16
  48.     END FOUNDATION
  49.  
  50.     | Now the right...
  51.     FOUNDATION
  52.       X 14 + 16 * CW - foundation * CW
  53.       Y 16
  54.     END FOUNDATION
  55.  
  56.   END FOR
  57.  
  58.   | Now for the stacks (eight left, eight right)
  59.   FOR stack = 0 TO 7
  60.  
  61.     | First the left
  62.     STACK
  63.       | Each one below a foundation
  64.       X 14 + stack * CW
  65.       Y 16 + CH
  66.       | Allow only kings to be placed on empty stacks
  67.       FIRST 13
  68.       | An upper limit of thirty cards on each
  69.       MAX 30
  70.       | We want one card on the left increasing to eight in the middle
  71.       DEAL stack + 1 , stack + 1
  72.       | We need deep stack checking when adding stacks
  73.       | and only cards of the same colour can be added.
  74.       | The card value offset is the default of decrementing by one.
  75.       | These stacks can also accept cards after a click operation.
  76.       FLAGS PaintDown DeepCheck ClickFly Join__SC
  77.       | An ID of 1, this is were the pack will deal to.
  78.       ID 1
  79.     END STACK
  80.  
  81.     | Now the right
  82.     STACK
  83.       | One card at the far right, eight in the middle
  84.       X 14 + 16 * CW - stack * CW
  85.       | All else is the same as those on the left....
  86.       Y 16 + CH
  87.       FIRST 13
  88.       MAX 30
  89.       DEAL stack + 1 , stack + 1
  90.       | Except the way stacks append (different colour)
  91.       FLAGS DeepCheck ClickFly Join__DC
  92.       ID 1
  93.     END STACK
  94.  
  95.   END FOR
  96.  
  97.   | We need a stack to hold the cards left to deal.
  98.   STACK
  99.     | Put it in the middle of the foundations
  100.     X 14 + 8 * CW
  101.     Y 16
  102.     | We don't want any cards to be added
  103.     MAX 0
  104.     | After the stacks, there are 136 cards left....
  105.     DEAL 136
  106.     | To each stack (ID=1) we deal one card.
  107.     DEALTO 1,1
  108.     | We don't want to take them back when dealt.
  109.     TAKEFROM 0
  110.     | The pack is deal only, no dragging.
  111.     DRAGUPTO 0
  112.     | It's display should be the card back and a count of cards left
  113.     FLAGS PaintCount
  114.   END STACK
  115.  
  116. END BEGIN
  117.